﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LevenBlog.Core.Data;
using LevenBlog.Core.Entities;

namespace LevenBlog.Core.User
{
    public interface IMembership : IDisposable
    {
        IDbProvider Provider { get; set; }

        lb_user User { get; }

        IAuthority Authority { get; }

        string CookieString { get; }

        void Read();

        void Write();

        void Write(DateTime expressTime);

        void LoadFull();

        bool Login(string username, string password);

        bool Login(string username, string password, DateTime loginTime);

        void Logout();

        bool CheckUser(string username);
    }
}
